#ifndef JOLFS_VOLUME_MERGER_H
#define JOLFS_VOLUME_MERGER_H

#include "volume.h"

namespace jolfs
{

  class MergerVolume : public Volume
  {
  public:
    MergerVolume( const std::string& name );
    MergerVolume( const MergerVolume& );
    ~MergerVolume();
    
  public:
    const VolumeList& getMergedVolumes() const;
    VolumeList& getMergedVolumes();
    
    void addMergedVolume( Volume* );
    void delMergedVolume( Volume* );
    
    virtual void addEntry( Entry* );
    
    virtual EntryList    getEntries() const;
    virtual Entry*       getRoot   ();
    virtual const Entry* getRoot   () const;
    virtual const Entry* getEntry( const std::string& path ) const;
    virtual Entry*       getEntry( const std::string& path );
    
  private:
    VolumeList mergedVolumes_;
    Entry      root_;
  };

} // namespace jolfs

#endif // JOLFS_VOLUME_MERGER_H
